<!DOCTYPE html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta property="og:type" content="website">
<meta property="og:title" content="smallmuou&#39;s blog">
<meta property="og:url" content="http://smallmuou.gitee.io/blog/page/16/index.html">
<meta property="og:site_name" content="smallmuou&#39;s blog">
<meta property="og:locale" content="zh-Hans">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="smallmuou&#39;s blog">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Muse',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://smallmuou.gitee.io/blog/page/16/"/>





  <title>smallmuou's blog</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left 
  page-home">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">smallmuou's blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"><a href="https://github.com/smallmuou">https://github.com/smallmuou</a></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/blog/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">
    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/07/24/2015-07-24-Objective-C之runtime/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/07/24/2015-07-24-Objective-C之runtime/" itemprop="url">Objective-C之runtime</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-07-24T00:00:00+08:00">
                2015-07-24
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/IOS/" itemprop="url" rel="index">
                    <span itemprop="name">IOS</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p><img src="http://cc.cocimg.com/api/uploads/20141224/1419385503900732.jpg" alt="image"></p>
<h4 id="1-从左到右：实例、对象、类"><a href="#1-从左到右：实例、对象、类" class="headerlink" title="1. 从左到右：实例、对象、类"></a>1. 从左到右：实例、对象、类</h4><ul>
<li>对象是类的实例化，实例是对象的实例化</li>
</ul>
<h4 id="2-理解self"><a href="#2-理解self" class="headerlink" title="2. 理解self"></a>2. 理解self</h4><ul>
<li>在类方法中，self指向类对象地址（即上图中间部分）</li>
<li>在实例方法中，self指向实例地址（即上图左边部分）</li>
</ul>
<h4 id="3-理解super"><a href="#3-理解super" class="headerlink" title="3. 理解super"></a>3. 理解super</h4><ul>
<li>编译器定的符号（类似while）强调的是调用父类方法</li>
</ul>
<h4 id="4-class方法"><a href="#4-class方法" class="headerlink" title="4. class方法"></a>4. class方法</h4><pre>
+ (Class)class {
    return self; //指向上图中间部分
}
</pre>
<pre>
- (Class)class {
    return object_getClass(self); //指向上图中间部分
}
</pre>
PS: `[[NSObject new] class]` `[NSObject class]` `[[NSObject class] class]`都是指向同一地址

#### 5. isKindOf方法
<pre>
- (BOOL)isKindOf:aClass
{
    Class cls;
    for (cls = isa; cls; cls = cls->superclass) 
        if (cls == (Class)aClass)
            return YES;
    return NO;
}
</pre>

<h4 id="6-isMemberOf方法-即isKindOf的部分条件"><a href="#6-isMemberOf方法-即isKindOf的部分条件" class="headerlink" title="6. isMemberOf方法 - 即isKindOf的部分条件"></a>6. isMemberOf方法 - 即isKindOf的部分条件</h4><pre>
- (BOOL)isMemberOf:aClass
{
    return isa == (Class)aClass;
}
</pre>

<h4 id="7-对class取指针-并强转成NSObject对象-（等效于-对该class实例化）"><a href="#7-对class取指针-并强转成NSObject对象-（等效于-对该class实例化）" class="headerlink" title="7. 对class取指针,并强转成NSObject对象 （等效于 对该class实例化）"></a>7. 对class取指针,并强转成NSObject对象 （等效于 对该class实例化）</h4><pre>
id cls = [NSString class];
void* p = &cls;
[(__bridge NSString*)p class];
</pre>
PS: 如上代码正常返回，并不会crash，原因在于
<pre>
typedef struct objc_object *id;
struct objc_object {
    Class isa;
};
</pre>

<p><img src="http://7ximmr.com1.z0.glb.clouddn.com/objc_runtime_1.jpg" alt="image"></p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/07/09/2015-07-09-2015半年个人工作总结/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/07/09/2015-07-09-2015半年个人工作总结/" itemprop="url">2015半年个人工作总结</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-07-09T00:00:00+08:00">
                2015-07-09
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/其他/" itemprop="url" rel="index">
                    <span itemprop="name">其他</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>转眼又是半年，这里对这半年的工作来个小结.</p>
<h2 id="1-主要工作内容"><a href="#1-主要工作内容" class="headerlink" title="1. 主要工作内容"></a>1. 主要工作内容</h2><h4 id="微居（iOS）"><a href="#微居（iOS）" class="headerlink" title="微居（iOS）"></a>微居（iOS）</h4><ul>
<li>底层<ul>
<li>微居服务层模型构建</li>
<li>QQ、微信分享封装</li>
<li>协议SDK框架构建</li>
<li>SQlite数据库ORM构建</li>
<li>手机对讲SDK封装</li>
<li>开锁实现</li>
<li>友盟SDK移植</li>
</ul>
</li>
<li>UI<ul>
<li>接听监视界面实现</li>
<li>监视列表界面实现</li>
<li>用户登录流程梳理</li>
<li>召梯、布防流程实现</li>
</ul>
</li>
<li>其他<ul>
<li>b1、b2、b3、b4提测及BUG修复工作</li>
<li>体验优化</li>
<li>微居v0.4上架</li>
</ul>
</li>
</ul>
<h4 id="其他"><a href="#其他" class="headerlink" title="其他"></a>其他</h4><ul>
<li>Wireless HDD Fast Sync评估</li>
<li>Git服务器部署</li>
<li>Git开发模型尝试</li>
</ul>
<h2 id="2-成长及收获"><a href="#2-成长及收获" class="headerlink" title="2. 成长及收获"></a>2. 成长及收获</h2><p>这半年来收获还是蛮大的，主要表现在以下几个方面:</p>
<h4 id="1-APP的第三方库管理"><a href="#1-APP的第三方库管理" class="headerlink" title="(1) APP的第三方库管理"></a>(1) APP的第三方库管理</h4><p>经过半年微居项目的实践，对于第三方库管理办法有了比较有效的办法，了解到的管理方法有：手动、CocoaPods、git submodule，而这些各有优势各有劣势，因此需要做到取其长避其短，后期将采用CocoaPods+手动来管理第三方库，针对CocoaPods更新慢的问题将采用私有Specs来解决.</p>
<h4 id="2-APP的MVC-Service-ViewModel框架应用"><a href="#2-APP的MVC-Service-ViewModel框架应用" class="headerlink" title="(2) APP的MVC+Service+ViewModel框架应用"></a>(2) APP的MVC+Service+ViewModel框架应用</h4><p>针对以往在Wireless HDD遇到的一些问题（Controller过于庞大、模块化不清），这里引入了MVVM机制，可以有效减少Controller的负担，通过ViewModel来分担Controller的View展示功能；同时对于模块化不清问题，引入了Service概念，通过Service来整合第三方库，解脱了Controller、View层的负担，使得整个框架清晰，而且增加了项目的维护性和开发可控性</p>
<h4 id="3-GIT"><a href="#3-GIT" class="headerlink" title="(3) GIT"></a>(3) GIT</h4><p>自去年深圳培训回来后，就渐渐从SVN转入GIT阵营，通过微居项目的半年实践，对GIT有了一个全新的认识，现在已经能比较熟练地利用GIT来管理项目，包括GIT分支、合并、打TAG、还原、模块化等等，同时对于GIT内部组成也有了一定的认识，能够比较准确的定位问题，当然这条路还很长，还有很多内容需要学习，如多人协作、分支管理、持续化构建等。</p>
<h2 id="3-展望"><a href="#3-展望" class="headerlink" title="3. 展望"></a>3. 展望</h2><p>回忆了过去，自然得展望下未来，关于未来，或者说是下半年，我希望构建一个我们部门内iOS开发的基础库，将一些过去项目开发常用的方法、APP第三方库管理、Service框架等集合进去，并利用GitLab作为平台进行管理维护。另外，会尝试去引导其他人员去使用GIT、去构建他们自己的共有库。这样对于部门来说是一种积累，而且能大大加快后期新项目的开发进度。</p>
<h2 id="4-建议及意见"><a href="#4-建议及意见" class="headerlink" title="4. 建议及意见"></a>4. 建议及意见</h2><p>有所积累、资源复用</p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/07/08/2015-07-08-创建自己的CocoaPods私有仓库/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/07/08/2015-07-08-创建自己的CocoaPods私有仓库/" itemprop="url">创建自己的CocoaPods私有仓库</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-07-08T00:00:00+08:00">
                2015-07-08
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/版本管理/" itemprop="url" rel="index">
                    <span itemprop="name">版本管理</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>引入CocoaPods来管理iOS第三方库有一段时间了，这里说一下体会 “快乐并痛着”，为何说快乐呢，可以方便我们去寻找第三方库，并引入到已有的项目工程中，而且保证了工程结构的清晰；为何又说痛着呢，主要是由于更新第三方库太慢了，目前我们引用的第三方库已将近20个，更新一次耗费了至少得半个小时以上，而且更可恶的是，更新期间无法编译代码；总的来说，还是痛多些，现在都不敢更新，于是Google下，发现<a href="https://guides.cocoapods.org/making/private-cocoapods.html" target="_blank" rel="noopener">CocoaPods支持私有仓库</a>. 这里简单描述我的经过.</p>
<h3 id="1-创建Repo"><a href="#1-创建Repo" class="headerlink" title="1. 创建Repo"></a>1. 创建Repo</h3><pre>
StarnetdeMacBook-Pro:EVideoSpecs starnet$ tree
.
├── CocoaPods-version.yml
├── README.md
└── Specs
    ├── AAPullToRefresh
    │   └── 1.0.2
    │       └── AAPullToRefresh.podspec.json
    ├── PPAdvertisingView
    │   └── 1.0.0
    │       └── PPAdvertisingView.podspec
    └── SDWebImage
        └── 3.7.2
            └── SDWebImage.podspec

7 directories, 5 files

</pre>
Repo结构如上，大致说明下

* CocoaPods-version.yml - CocoaPods版本信息，可以到CocoaPods的官方[Repo](https://github.com/CocoaPods/Specs)拷贝
* Specs - 存放第三方库的.podspec，可以先为空，后续再添加

创建好后，提交到自己的Git服务器上，比如我的: http://192.168.61.223/xuwf/evideospecs.git

### 2. 添加到CocoaPods
<pre>
pod repo add EVideoSpecs http://192.168.61.223/xuwf/evideospecs.git
</pre>
不懂，查帮助`pod repo help`

### 3. 添加第三方库podspec文件
<pre>
├── Specs
    └── [SPEC_NAME]
        └── [VERSION]
            └── [SPEC_NAME].podspec

</pre>
可以自己创建podspec，也可以直接去CocoaPods的官方[Repo](https://github.com/CocoaPods/Specs)拷贝，比如我拷贝了AAPullToRefresh.podspec.json

可以用` pod spec lint`验证.podspec合法性，这里说明一点，从CocoaPods的官方Repo看到的都是json格式，这里可以通过`pod ipc spec`来将spec文件转换成json.

### 4. 更新Repo
<pre>
git add .
git commit -m "添加了AAPullToRefresh第三方库"
git push origin master
</pre>
更新CocoaPods的Repo
<pre>
pod repo update
</pre>

<h3 id="5-验证"><a href="#5-验证" class="headerlink" title="5. 验证"></a>5. 验证</h3><p>此时通过<code>pod search 您的库名</code>就能检索出你添加的第三方库</p>
<h3 id="6-添加到工程"><a href="#6-添加到工程" class="headerlink" title="6. 添加到工程"></a>6. 添加到工程</h3><p>编辑Podfile</p>
<p><pre><br>source 您的私有Repo地址  # 我的: source ‘<a href="http://192.168.61.223/xuwf/evideospecs&#39;" target="_blank" rel="noopener">http://192.168.61.223/xuwf/evideospecs&#39;</a></pre></p>
<p>pod ‘您的第三方库’<br><br>重点说明下，必须添加source，否则<code>pod install</code>会默认去Clone CocoaPods的官方Repo到本地，这得卡好久好久，因此强烈建议加上</p>
<h3 id="7-pod-install-update"><a href="#7-pod-install-update" class="headerlink" title="7. pod install/update"></a>7. pod install/update</h3><p>后续的操作，大家应该都比较清晰，这里不做阐述.</p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/07/03/2015-07-03-关于Github上的Contributions不记录问题/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/07/03/2015-07-03-关于Github上的Contributions不记录问题/" itemprop="url">关于Github上的Contributions不记录问题</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-07-03T00:00:00+08:00">
                2015-07-03
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/版本管理/" itemprop="url" rel="index">
                    <span itemprop="name">版本管理</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>很长时间一段时间都认为Github的Contributions只有通过pull request才能更新，今天特地Google了下，发现原来不是如此，关于Contributions，Github给出了答案。</p>
<p>以下情况Contributions将被记录:</p>
<h3 id="1-issues-and-pull-requests"><a href="#1-issues-and-pull-requests" class="headerlink" title="1. issues and pull requests"></a>1. issues and pull requests</h3><ul>
<li>一年内</li>
<li>自己的库（非fork）</li>
</ul>
<h3 id="2-Commits"><a href="#2-Commits" class="headerlink" title="2. Commits"></a>2. Commits</h3><ul>
<li>一年内</li>
<li>邮箱地址一致</li>
<li>Master分支下</li>
</ul>
<h3 id="3-Fork"><a href="#3-Fork" class="headerlink" title="3. Fork"></a>3. Fork</h3><ul>
<li>需要Star</li>
<li>pull request或issue</li>
<li>是组织的一员</li>
</ul>
<p>于是我发现应该是邮箱不一致导致的，通过</p>
<pre>
git config user.email
</pre>
发现邮箱与Github上的不一样（由于我还用了GitLab），通过如下修改
<pre>
git config --global user.email "xxxx@xxx.com"
</pre>

<p>修改后尝试commit，发现ok. 终于可以好好玩耍Contributions了.</p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/07/02/2015-07-02-论git还原/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/07/02/2015-07-02-论git还原/" itemprop="url">论git还原</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-07-02T00:00:00+08:00">
                2015-07-02
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/版本管理/" itemprop="url" rel="index">
                    <span itemprop="name">版本管理</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>以前在使用SVN工具时，经常用到revert来还原到某个提交点，而现在切换到git，是否也有呢? 答案是肯定的，那么下面我们来看看git如何实现还原。</p>
<h3 id="workspace、index、HEAD"><a href="#workspace、index、HEAD" class="headerlink" title="workspace、index、HEAD"></a>workspace、index、HEAD</h3><p>在了解git还原之前，我们先要理解git的几个常用概念workspace、index、HEAD、commit、local、remote等.先来看看下图:</p>
<p><img src="http://i.stack.imgur.com/caci5.png" alt="image"></p>
<p>从上图我们可以总结如下:</p>
<ul>
<li>workspace - 对应本地目录，当有文件修改，则最先体现在workspace变化</li>
<li>index - 是索引文件，指定commit要提交的内容</li>
<li>commit - 提交到本地仓库</li>
<li>HEAD - 表示本地最新的一次commit</li>
<li>git diff - 比较workspace与index</li>
<li>git diff -cached - 比较index与commit</li>
<li>git diff HEAD - 比较workspace与commit</li>
</ul>
<h3 id="git-reset"><a href="#git-reset" class="headerlink" title="git reset"></a>git reset</h3><p>有了以上的基础，我们来看看git如何实现还原，通过查阅可以知道git是通过reset来还原，那么我们来看看help</p>
<pre>
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [< commit>]
   or: git reset [-q] < tree-ish> [--] < paths>...
   or: git reset --patch [< tree-ish>] [--] [< paths>...]
    -q, --quiet           be quiet, only report errors
    --mixed               reset HEAD and index
    --soft                reset only HEAD
    --hard                reset HEAD, index and working tree
    --merge               reset HEAD, index and working tree
    --keep                reset HEAD but keep local changes
    -p, --patch           select hunks interactively
    -N, --intent-to-add   record only the fact that removed paths will be added later
</pre>

<p>这里可以看下mixed、soft、hard几个选项的区别</p>
<ul>
<li>mixed - 还原HEAD和index（即默认情况），即workspace内容还在；若想恢复，你可以通过add+commit来重新提交</li>
<li>soft - 只还原HEAD，即只还原commit，index还会存在；若想恢复，你可以再次commit</li>
<li>hard - 还原HEAD, index 和workspace，此情况，你无法恢复回来</li>
</ul>
<h3 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h3><p>目前为止，应该对git还原有了比较深刻的认识，至于如何选择，要看你项目的实际需求.</p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/06/25/2015-06-25-awesome-ios-develop/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/06/25/2015-06-25-awesome-ios-develop/" itemprop="url">awesome-ios-develop</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-06-25T00:00:00+08:00">
                2015-06-25
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/IOS/" itemprop="url" rel="index">
                    <span itemprop="name">IOS</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>下文是我在开发iOS APP两年后的一些经验总结.</p>
<ul>
<li><p>Objective C 代码规范</p>
<ul>
<li>采用骆驼峰法命名</li>
<li>类名、变量全拼，尽量不缩写</li>
<li>类成员变量使用_开头</li>
<li>类名、协议名首字母大写    </li>
<li>更多详情参考<a href="https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.pdf" target="_blank" rel="noopener">苹果规范</a></li>
</ul>
</li>
<li><p>采用git来做版本管理</p>
</li>
<li>gitignore必不可少，否则会多出很多冲突</li>
<li><p>善用Github，如follow、starred、fork</p>
</li>
<li><p>善用Code Snippet</p>
<ul>
<li>将最常用的代码端放入到snippet中，并定义尽量少的快捷键(一般2个)，如bg - 后台线程，fg - 前台线程</li>
<li>将这些Code Snippet同步到github</li>
</ul>
</li>
<li><p>使用独立的log系统（如CocoaLumberjack），而不是用系统的NSLog</p>
</li>
<li>善用宏，将需要大量使用的接口调用用宏替换<pre>
#define IMG(__name) [UIImage imageNamed:__name]
#define RGBA(R, G, B, A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]
#define RGB(R, G, B) RGBA(R, G, B, 1)
</pre></li>
<li>当第三方库中有对Cocoa SDK类进行扩展时，注意添加-ObjC链接flag</li>
</ul>
<h3 id="调试和发布"><a href="#调试和发布" class="headerlink" title="调试和发布"></a>调试和发布</h3><ul>
<li>真机调试，Certificates、Identifiers、Provisioning Profile必不可少</li>
<li>使用TestFlight进行内部分发，支持20个内部账号和1000个外部账号</li>
<li>使用iTunes Connect来管理和发布APP</li>
<li>利用xcode查看UIImage对象的图<br><img src="http://7ximmr.com1.z0.glb.clouddn.com/xcode_debug_show_uiimage.jpg" alt="image"></li>
</ul>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/06/25/2015-06-25-awesome-raspberrypi/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/06/25/2015-06-25-awesome-raspberrypi/" itemprop="url">awesome-raspberrypi</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-06-25T00:00:00+08:00">
                2015-06-25
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/树莓派/" itemprop="url" rel="index">
                    <span itemprop="name">树莓派</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>本文将记录我在树莓派开发过程中遇到的一些难点.</p>
<h4 id="无线网卡配置"><a href="#无线网卡配置" class="headerlink" title="无线网卡配置"></a>无线网卡配置</h4><ul>
<li><p>ifconfig查看是否有wlan0<br><pre><br>wlan0     Link encap:Ethernet  HWaddr 00:08:10:75:f0:26  </pre></p>
<pre><code>UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:184 errors:0 dropped:0 overruns:0 frame:0
TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 
RX bytes:28662 (27.9 KiB)  TX bytes:8571 (8.3 KiB)
</code></pre><p><br>PS: 如果有则说明驱动没问题，否则请安装相应驱动</p>
</li>
<li><p>sudo vim /etc/wpa_supplicant/wpa_supplicant.conf<br><pre><br>ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev<br>update_config=1</pre></p>
</li>
</ul>
<p>network={<br>ssid=”你的wifi名”<br>psk=”你的wifi密码”<br>proto=RSN<br>key_mgmt=WPA-PSK<br>group=CCMP TKIP<br>}<br></p>
<ul>
<li>扫描网络<pre>
sudo iwlist wlan0 scan
</pre></li>
<li>sudo vim /etc/network/interfaces<pre>
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet static
address 192.168.2.111
netmask 255.255.255.0
network 192.168.2.0
gateway 192.168.2.1
</pre></li>
<li>启动wlan0<pre>
sudo ifup wlan0
</pre></li>
<li>ifconfig查看是否连接成功<pre>
wlan0     Link encap:Ethernet  HWaddr 00:08:10:75:f0:26  
        inet addr:192.168.2.111  Bcast:255.255.255.255  Mask:255.255.255.0
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:677 errors:0 dropped:0 overruns:0 frame:0
        TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000 
        RX bytes:83187 (81.2 KiB)  TX bytes:10637 (10.3 KiB)
</pre>
</li>
</ul>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/06/25/2015-06-25-使用git的patch功能/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/06/25/2015-06-25-使用git的patch功能/" itemprop="url">使用git的patch功能</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-06-25T00:00:00+08:00">
                2015-06-25
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/版本管理/" itemprop="url" rel="index">
                    <span itemprop="name">版本管理</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>最近遇到一个这样的情况，云端需要架设SIP服务器，即需要在服务器端编译源码并生产可执行文件，而代码在局域网内维护，这样就一个代码同步的问题，如何把本地修改的内容同步到云端，通过Google发现git有一个patch的功能，就能实现代码同步，具体有2种方式，描述如下:</p>
<h3 id="1-git-diff"><a href="#1-git-diff" class="headerlink" title="1. git diff"></a>1. git diff</h3><ul>
<li>生成patch文件<pre>
git diff HEAD^ > 0000.patch //最近一次(HEAD^)修改的patch
</pre></li>
<li>拷贝patch到云端并git apply<pre>
git apply 0000.patch
</pre></li>
<li>提交代码到本地[option]<pre>
git commit -a -m "Patch Apply"
</pre>

</li>
</ul>
<h3 id="2-git-format-patch"><a href="#2-git-format-patch" class="headerlink" title="2. git format-patch"></a>2. git format-patch</h3><ul>
<li>生成patch文件<pre>
git format-patch HEAD^ //会生成一个0001-update-exsamples.patch类似的文件
</pre></li>
<li>拷贝patch到云端并git am<pre>
git am 0001-update-exsamples.patch
</pre>
</li>
</ul>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/06/18/2015-06-18-解决git的detached from临时分支问题/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/06/18/2015-06-18-解决git的detached from临时分支问题/" itemprop="url">解决git的detached from临时分支问题</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-06-18T00:00:00+08:00">
                2015-06-18
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/版本管理/" itemprop="url" rel="index">
                    <span itemprop="name">版本管理</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>今天偶然发现git会出现detached from的分支, 导致很多commit未push到服务器，以至于其他同事clone的代码编译错误</p>
<pre>
StarnetdeMacBook-Pro:mediastreamer2 starnet$ git branch -a
* (detached from b34a935)
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
</pre>
google发现如下解决方案

### 解决方案
<pre>
$ git branch temp e9abc7a
$ git checkout temp
Switched to branch 'temp'
$ git branch
  master
* temp
$ git log --graph --decorate --pretty=oneline --abbrev-commit master origin/master temp
* e9abc7a (HEAD, temp) push release notes 1.16 (again)
* 2f5d3fd adding the release notes for 1.16 to doc/
* 4581e52 (tag: rear-1.16, origin/master, origin/HEAD, master) prepare rear for new release 1.16
*   de337d4 Merge pull request #403 from ypid/df-encfs-fix

$ git diff master temp
diff --git a/doc/rear-release-notes.txt b/doc/rear-release-notes.txt
....

$ git diff origin/master temp
diff --git a/doc/rear-release-notes.txt b/doc/rear-release-notes.txt
....
$ git branch -f master temp
$ git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 2 commits.
  (use "git push" to publish your local commits)
$ git push
$ git branch -d temp
Deleted branch temp (was e9abc7a).
</pre>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://smallmuou.gitee.io/blog/blog/2015/06/12/2015-06-12-在MacOSX上如何抓拍iPhone或iPad的屏幕/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="smallmuou">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="smallmuou's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/blog/2015/06/12/2015-06-12-在MacOSX上如何抓拍iPhone或iPad的屏幕/" itemprop="url">在MacOSX上如何抓拍iPhone或iPad的屏幕</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2015-06-12T00:00:00+08:00">
                2015-06-12
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/SHELL/" itemprop="url" rel="index">
                    <span itemprop="name">SHELL</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>今天看到iTool有一个LiveDesktop的东东，感觉挺新奇的. 于是想看看是什么原理，找了半天，发现一个好东西<a href="https://github.com/libimobiledevice/libimobiledevice" target="_blank" rel="noopener">libimobiledevice</a>，这个开源库提供很多工具，比如查看设备信息、设备DEBUG信息，大家可以直接编译生成这个工具，当然也可以到<a href="https://github.com/benvium/libimobiledevice-macosx" target="_blank" rel="noopener">这里</a>下载编译好的可执行文件.</p>
<pre>
git clone https://github.com/benvium/libimobiledevice-macosx
cd libimobiledevice-macosx
export DYLD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH 
./idevicescreenshot -u 690a505acd5ea06233a2c10c173907c135070ace
</pre>
执行上述命令后，可以在当前路径下生成screenshot-xxx.tiff

### 编译libimobiledevice
<pre>
sudo brew install usbmuxd
git clone https://github.com/libimobiledevice/libimobiledevice
cd libimobiledevice
./autogen.sh
make
make install
</pre>

<h4 id="展望"><a href="#展望" class="headerlink" title="展望"></a>展望</h4><p>我稍微查看了下抓拍的原理，是往usb发送相应的指令，并接收图片数据. 后续会继续了解libimobiledevice相关的代码.</p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
  </section>

  
  <nav class="pagination">
    <a class="extend prev" rel="prev" href="/blog/page/15/"><i class="fa fa-angle-left"></i></a><a class="page-number" href="/blog/">1</a><span class="space">&hellip;</span><a class="page-number" href="/blog/page/15/">15</a><span class="page-number current">16</span><a class="page-number" href="/blog/page/17/">17</a><span class="space">&hellip;</span><a class="page-number" href="/blog/page/20/">20</a><a class="extend next" rel="next" href="/blog/page/17/"><i class="fa fa-angle-right"></i></a>
  </nav>



          </div>
          


          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">smallmuou</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">197</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/blog/categories/index.html">
                  <span class="site-state-item-count">12</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/smallmuou" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-globe"></i>GitHub</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">smallmuou</span>

  
</div>

    <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

    <span id="busuanzi_container_site_pv">总访问量<span id="busuanzi_value_site_pv"></span>次</span>
    <span class="post-meta-divider">|</span>



  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Muse</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  

  

  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
